1. Field of the Invention
The present invention relates to the programming of microcontrollers, and in particular to a method of utilizing a single connector to perform both programming and diagnostic functions for a microcontroller.
2. Description of the Prior Art
As is known in the art, many current devices are controlled internally by a special purpose computer system known as an embedded system. Embedded systems generally use microcontrollers that contain many elements of a computer, such as a central processing unit, memory (RAM and ROM) and I/O, on a single chip or device. Most modern microcontrollers include flash memory, which is a form of non-volatile storage that can be electrically erased and reprogrammed so that software for the microcontroller can be readily stored, booted, and rewritten as necessary. One advantage of flash memory is that it can be erased and reprogrammed at signal levels normally found inside the microcontroller, and therefore flash memory can be reprogrammed without removing the microcontroller from the device of which it is a part (so called “in-circuit” reprogramming).
Generally, embedded system development involves two basic functional steps, namely a programming step wherein software to be executed by the microcontroller for controlling various aspects of the device in question is written and loaded into the flash memory, and a diagnostic step wherein the functionality of the loaded software is evaluated and tested. Furthermore, these steps are typically repeated iteratively a number of times until the desired level of functionality of the system is achieved.
As is known, microcontrollers include a number of pins for making electrical connections thereto. The programming of a microcontroller is normally facilitated by way of a connector that is provided on the circuit board containing the microcontroller. The connector has, at one end, a number of pins having leads connected thereto. The leads are in turn connected to the various pins of the microcontroller. At the opposite end, the connector has a number of ports, each port being connected to a respective one of the pins. The ports enable external connections to be made to the connecter (and ultimately the pins of the microcontroller through the leads connected to the connector), such as connections from a microcontroller programming tool, a number of which are known and commercially available.
Diagnostic functions, on the other hand, are currently typically performed through the use of one or more external “daughter” boards that implement the diagnostic functionality. This approach, while effective, is disadvantageous, as it requires one or more additional connectors to be added to the circuit board containing the microcontroller to interface with the external “daughter” board or boards. These additional connectors add expense and occupy valuable circuit board space.